package cn.ycl.system.other.study.designMode.singleton;

/**
 * 静态代码块方式创建单例模式
 * @author YuanChangLiang
 * @description
 * @date created in 16:47 2022/4/29
 */


public class Singleton {
    private static Singleton singleton;

    private Singleton(){}

    static{
        singleton = new Singleton();
    }

    public Singleton getSingleton(){
        return singleton;
    }
}
